<?PHP
defined('_XR_EXEC') or die();
/**
 * 控制器处理类 
 */
class home_controller extends controller{
	function __construct(){
		parent::__construct();
	 	$this->assign('menuid','1');
	}
	function index__(){
		$db=factory::getDBO();
		$this->assign('wrappers',array_keys($db->loadassoclist('select pic from `t_wrapper` where pic<>"" order by show_index asc','pic'))  );
		
		
		
		
		# 促销信息,第一条
		$rs_cuxiao = $db->loadassoc('
			select 
			a.*
			from `t_pen` a 
		   where a.pentype_id = 2 and a.deleted=0 and a.publishs=1 order by a.id desc limit 0,1 '); 
		if(!rs_cuxiao){
			$rs_cuxiao = false;
		}
		$this->assign('rs_cuxiao',$rs_cuxiao);
	}  
	
	
	 
}
?>